<?php define('__ROOT__', dirname(dirname(__FILE__))); include_once(__ROOT__.'/includes/header.php'); ?>
<link rel="stylesheet" href="<?php echo base_url("assets/css/jquery.fancybox.css"); ?>" />
<div class="span9">
	<ul class="breadcrumb">
		<li>
			<a href="<?php echo base_url('/home'); ?>">Home</a> <span class="divider">/</span>
		</li>
		<li>
			<a href="<?php echo base_url('/property'); ?>">Property</a>
		</li>
		<?php if (isset($bookmark)): ?>
		<span class="divider">/</span>
		<li>
			<?php echo $bookmark; ?></a>
		</li>
		<?php endif;?>
	</ul>
<div class="main_content detail-product">						
	<h3 class="title"><?php echo $property->type ?></h3>			
			<div class="row-fluid">
			<div class="span4">
				<a href="<?php echo site_url((isset($property->primary_image) ? '/assets/uploads/property/' . $property->primary_image : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 1"><img alt="" src="<?php echo site_url((isset($property->primary_image) ? '/assets/uploads/property/' . $property->primary_image : '/assets/uploads/dummy.png')); ?>"></a>												
				<ul class="thumbnails small">								
					<li class="span4">
						<a href="<?php echo site_url((isset($property->small_image1) ? '/assets/uploads/property/' . $property->small_image1 : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 2"><img src="<?php echo site_url((isset($property->small_image1) ? '/assets/uploads/property/' . $property->small_image1 : '/assets/uploads/dummy.png')); ?>" alt=""></a>
					</li>								
					<li class="span4">
						<a href="<?php echo site_url((isset($property->small_image2) ? '/assets/uploads/property/' . $property->small_image2 : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 3"><img src="<?php echo site_url((isset($property->small_image2) ? '/assets/uploads/property/' . $property->small_image2 : '/assets/uploads/dummy.png')); ?>" alt=""></a>
					</li>													
					<li class="span4">
						<a href="<?php echo site_url((isset($property->small_image3) ? '/assets/uploads/property/' . $property->small_image3 : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 4"><img src="<?php echo site_url((isset($property->small_image3) ? '/assets/uploads/property/' . $property->small_image3 : '/assets/uploads/dummy.png')); ?>" alt=""></a>
					</li>
				</ul>
			</div>
						
				<div class="row-fluid span5">
					 <table class="table">
								<tr>
									<td><strong>Bed Rooms</strong></td>
									<td><?php echo $property->bed_room; ?></td>
									<td ><strong>Square Ft</strong></td>
									<td><?php echo $property->square_ft; ?> sqft</td>
								</tr>
								<tr>
									<td><strong>Bath Rooms</strong></td>
									<td><?php echo $property->bath_room; ?></td>
									<td><strong>Facing</strong></td>
									<td><?php echo $property->facing; ?></td>
								</tr>
								<tr>
									<td><strong>Living Rooms</strong></td>
									<td><?php echo $property->living_room; ?></td>
									<td><strong>Floor No</strong></td>
									<td><?php echo $property->floor_no; ?></td>
								</tr>
								<tr>
									<td><strong>Years Old</strong></td>
									<td><?php echo $property->years_old; ?></td>
									<td><strong>Furnished</strong></td>
									<td><?php echo $property->furnished; ?></td>
								</tr>
						</table>
				</div>
				 <div class="row-fluid span8">
				   
					<div class="span8">
						<h4>
						<?php 
							if ($property->price== "")
								echo '<button type="button" class="btn btn-info">Call for price</button>'; 
						?>

						<strong><?php echo $property->price; ?><?php echo $property->price_denote; ?></strong>		
						<span>
							<?php 
							if ($property->is_negotiable)
								echo '<img src="' . site_url('/assets/img/nego_button.gif') . '">';
							?>
						</span></h4>	
										
						<div>
						Township : Sanchaung	City:	Yangon	Country:	Myanmar<br>
						Full Address	
						</div>	
						<div class="contact-information">
							<h5>CONTACT INFORMATION</h5>
							<address>				
								
							</address>
							<p><strong>Contact Name: </strong><?php echo $property->contact_person; ?><br/>
							<strong>Phone: </strong> <?php echo $property->contact_number; ?><br/>
							<strong>E-mail: </strong> <a href="#myModal" role="button" data-toggle="modal"><?php echo $property->contact_email; ?></a><br/>
							<strong>URL: </strong> <a href="#" target="_blank"></a></p>
						</div>	
						<div class="row-fluid">
							Features:

							Near By:


						</div>
					</div>
					</div>
						      

			  </div>
			  <div class="container-fluid">
			  <div class="row-fluid">
				<p><?php echo $property->description; ?> <br/></p>
				</div>
			  </div>
			<div class="row-fluid">
				<div class="span12" id="messagelink">
					<ul class="nav nav-tabs" id="myTab">
						<li class="active"><a href="#home">MESSAGE TO ADVERTISER</a></li>
						<li><a href="#profile">Advertiser's Other Ads</a></li>
						<li><a href="#map">Map View</a></li>
					</ul>							 
					<div class="tab-content">
						<div class="tab-pane active" id="home">
						<form class="form-horizontal">
						  <div class="control-group">
							<label class="control-label" for="inputEmail">Email</label>
							<div class="controls">
							  <input type="text" id="inputEmail" placeholder="Email">
							</div>
						  </div>
						  <div class="control-group">
							<label class="control-label" for="inputName">Name</label>
							<div class="controls">
							  <input type="text" id="inputName" placeholder="Full Name">
							</div>
						  </div>
						  <div class="control-group">
							<label class="control-label" for="inputMsg">Message</label>
							<div class="controls">
							  <input type="textarea" id="inputMsg" placeholder="Message">
							  <input type="hidden" id="inputUrl" value="<?php echo base_url(); ?>api/message/send/format/json">
							</div>
						  </div>
						  <div class="control-group">
							<div class="controls">
							   <a id="messagesubmit" class="btn btn-primary">Send</a>
							   <button type="reset" class="btn">Cancel</button>
							</div>
						  </div>
						</form>
						</div>
					<div class="tab-pane" id="profile">
						
							<div class="span7 well">
							<div class="other_info">
								<?php foreach ($others as $other): ?>
									 <p>
										<strong><a href=""><?php echo $other->title; ?></a></strong>
										<br/>Property Type: <a href="<?php echo base_url('property/browse/' . $other->typeID ); ?>"><?php echo $other->type; ?></a>- <?php echo date ("d/m/Y",strtotime($other->posted_date)); ?>					
									</p>
								<?php endforeach ?>
							</div>
						</div>
						</div>
					<div class="tab-pane" id="maptab">
							<div id="map-canvas"></div>
							Test
					</div>
						
					
					</div>							
				</div>							
		</div>	
	</div>
</div>
</div>
<?php include_once(__ROOT__.'/includes/footer.php'); ?>
<script type="text/javascript">
	// Create Map
	var map;
	function initialize() {
	  var mapOptions = {
	    zoom: 8,
	    center: new google.maps.LatLng(48.8582, 2.2945), //I see Paris, I see France
	    mapTypeId: google.maps.MapTypeId.ROADMAP
	  };
	 map = new google.maps.Map(document.getElementById('map-canvas'),
	  mapOptions);
	}
	$(document).ready(function(){
		$('ul.tabs').bind('tabsshow', function(event, ui) {
		if (ui.panel.id == "maptab") {
			$(ui.panel).css("height","400px")
       			google.maps.event.trigger(map, 'resize');
		}
	})
	});
</script>
